<template>
	<view class="container-dataCharts" style="background: url(/static/imgbgc.png) no-repeat; background-size: 100% 100%;height: 100%;">
		<view class="main">
			<view class="header">
				<view class="dataBgc">
					<image src="@/static/index/dataBgc.png" mode=""></image>
				</view>
				<view class="box">
					<view class="" style="color: #dcdcdc;text-align: center;font-size: 50rpx;">{{title}}</view>
					<u-count-to :startVal="0" :endVal="money" decimals="2" color="#fff" fontSize="50"></u-count-to>
				</view>
			</view>
			<view class="content">
				<view class="top-box flex-between">
					<view class="title">
						{{$t('home.name15')}}
					</view>
					<!-- <view class="rule" @click="$fun.jump(`/pageB/noticeList/noticeInfo?id=19&type=20&name=提现规则`)">
						积分规则
					</view> -->
				</view>
				<!-- 提现记录 -->
				<scroll-view scroll-y="true" class="records" @scrolltolower="scrolltolower">
					<view class="item" v-for="(item,index) in marthlist">
						<view class="flex-between">
							<text>{{item.date}}</text>
							<text class="price">+{{item.money}}</text>
						</view>
						<!-- <view class="createTime">
							33
						</view> -->
					</view>
				</scroll-view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				marthlist: [],
				type:0,
				money:0
			};
		},
		onLoad(options) {
			this.title = options.title
			this.type = options.type
			uni.setNavigationBarTitle({
				title:this.title
			})
			this.getList()
			
		},
		methods:{
			async getList(){
				const res = await this.$fun.ajax.post('user/poolflow', {type:this.type})
				this.marthlist = res.data.list
				this.money = res.data.money
			}
		}
	}
</script>

<style lang="scss">
	page {
		height: 100%;
	}

	.container-dataCharts {
		// position: relative;
		height: 100%;

		.main {
			height: 100%;

			.header {
				position: relative;

				.dataBgc {
					width: 100%;
					height: 280rpx;
				}

				.box {
					position: absolute;
					top: 50%;
					left: 50%;
					transform: translate(-50%, -50%);
				}
			}

			.content {
				padding: 30rpx;
				.top-box {
					color: #fff;
					padding: 20rpx 0;

					.title {
						font-family: PingFang SC, PingFang SC;
						font-weight: bold;
						font-size: 32rpx;
						color: #fff;
						line-height: 38rpx;
					}

					.rule {
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 24rpx;
						color: #848484;
						text-align: end;
					}


				}

				.records {
					margin: 20rpx 0;
					font-weight: 400;
					font-size: 24rpx;
					color: #fff;
					line-height: 28rpx;
					height: 65vh;

					.header {
						.lt {
							font-family: PingFang SC, PingFang SC;
							font-weight: bold;
							font-size: 28rpx;
							color: #fff;
							border-left: 5rpx solid #1e84f1;
							padding-left: 10rpx;
						}

						.rt {
							font-family: PingFang SC, PingFang SC;
							font-weight: 400;
							font-size: 24rpx;
							color: #999999;
						}
					}

					.item {
						border-bottom: 1rpx solid #dedede;
						padding: 15rpx 0;
					}

					.price {
						font-family: DIN, DIN;
						font-weight: bold;
						font-size: 26rpx;
						color: #dd0110;
						line-height: 40rpx;
					}

					.createTime {
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 24rpx;
						color: #999999;
						line-height: 32rpx;
					}
				}
			}
		}
	}
</style>